﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VASJ.Model;
using System.Web.Security;
using VASJ.Service.Library;

namespace VASJ.Service
{
    public partial class AcpInetService
    {
        #region "Property MembershipProvider"
        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetApplicationName
        /// </summary>
        /// <returns></returns>
        public string GetApplicationName()
        {
            return Membership.ApplicationName;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// SetApplicationName
        /// </summary>
        /// <param name="AppName"></param>
        public void SetApplicationName(string AppName)
        {
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetEnablePasswordReset
        /// </summary>
        /// <returns></returns>
        public bool GetEnablePasswordReset()
        {
            return Membership.EnablePasswordReset;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetEnablePasswordRetrieval
        /// </summary>
        /// <returns></returns>
        public bool GetEnablePasswordRetrieval()
        {
            return Membership.EnablePasswordRetrieval;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetMaxInvalidPasswordAttempts
        /// </summary>
        /// <returns></returns>
        public int GetMaxInvalidPasswordAttempts()
        {
            return Membership.MaxInvalidPasswordAttempts;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetMinRequiredNonAlphanumericCharacters
        /// </summary>
        /// <returns></returns>
        public int GetMinRequiredNonAlphanumericCharacters()
        {
            return Membership.MinRequiredNonAlphanumericCharacters;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetMinRequiredPasswordLength
        /// </summary>
        /// <returns></returns>
        public int GetMinRequiredPasswordLength()
        {
            return Membership.MinRequiredPasswordLength;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetPasswordAttemptWindow
        /// </summary>
        /// <returns></returns>
        public int GetPasswordAttemptWindow()
        {
            return Membership.PasswordAttemptWindow;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetPasswordFormat
        /// </summary>
        /// <returns></returns>
        public MembershipPasswordFormat GetPasswordFormat()
        {
            return Membership.Provider.PasswordFormat;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetPasswordStrengthRegularExpression
        /// </summary>
        /// <returns></returns>
        public string GetPasswordStrengthRegularExpression()
        {
            return Membership.PasswordStrengthRegularExpression;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetRequiresQuestionAndAnswer
        /// </summary>
        /// <returns></returns>
        public bool GetRequiresQuestionAndAnswer()
        {
            return Membership.RequiresQuestionAndAnswer;
        }

        //[PrincipalPermission(SecurityAction.Demand, Role = "ahs_service")]
        /// <summary>
        /// GetRequiresUniqueEmail
        /// </summary>
        /// <returns></returns>
        public bool GetRequiresUniqueEmail()
        {
            return Membership.Provider.RequiresUniqueEmail;
        }
        #endregion
    }
}